package com.kingsleo.serviceclient1.controller;

import com.kingsleo.serviceclient1.feign.ServiceClient2Feign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description:
 * @Author: zhenglinyong
 * @CreateDate: 2024/7/23 22:49
 **/
@RestController
public class HelloController {

    @Autowired
    private ServiceClient2Feign serviceClient2Feign;

    @GetMapping("/hello")
    public String sayHello() {
        return "Hello from Service Client 1";
    }

    @GetMapping("/call-service-client2")
    public String callServiceClient2() {
        return serviceClient2Feign.sayHello();
    }
}
